import { createStore } from "redux"
import coreReducer from "./reducer"
import {fromJS} from "immutable"

export const DEFAULT_STATE = fromJS({
    rooms: [{
        id: "0",
        name: "公开房间"
    }]
})

export function makeStore( state=DEFAULT_STATE ){
    return createStore( coreReducer, state )
}


//redux.createStore
//Store.getState()
//Store.dispatch( action )
//Store.subscribe( listener )